﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GcmpDwgDxfInterface.h"
#include "DwgExportData.h"

namespace gcmp
{
    class IModelView;
    class ILinkDocumentElement;
    class ILinkElementProxy;
    /// \brief 对象实例导出成块定制类
    class GCMP_DWG_DXF_INTERFACE_EXPORT IExportBlockCustomizer
    {

    public:
        /// \brief 通过主文档的Element获取图块名称及图层名称
        /// \param pModelView 视图
        /// \param elementId 构件id
        /// \param blockName 图块名称
        /// \param layerName 图块的图层名称
        /// \return 返回true表示设置成功，false表示设置失败
        virtual bool GetBlockNameAndLayerByElement(const IModelView* pModelView, const ElementId& elementId, std::wstring& blockName, std::wstring& layerName) const = 0;

        /// \brief 链接文档获取图块名称及图层名称
        /// \param pLinkDocument 链接文档指针
        /// \param blockName 图块名称
        /// \param layerName 图块的图层名称
        /// \return 返回true表示设置成功，false表示设置失败
        virtual bool GetBlockNameAndLayerByLinkDocument(const ILinkDocumentElement* pLinkDocument, std::wstring& blockName, std::wstring& layerName) const = 0;
    
    public:
        virtual ~IExportBlockCustomizer();
    };
}


